package com.zebra.gateway.session;


import java.util.concurrent.ConcurrentHashMap;

/**
 * 登录 临时 缓存的 login session 登录成功需要移植到 正式 SessionManager
 */
public class LoginSessionManager {

    public static LoginSessionManager LOGINSESSION = new LoginSessionManager();
    private static ConcurrentHashMap<Long, Session> tmepSession = new ConcurrentHashMap<>();

    private LoginSessionManager(){}


    public void putSession(Session session){
        tmepSession.put(session.getUserId(), session);
    }

    public Session removeSession(long userId){
        return tmepSession.remove(userId);
    }


}
